{extend name="../application/public/base.html" /}
{block name="head"}
    <link rel="stylesheet" href="ADMIN_CUSTOM/css/btn.css">
    <link rel="stylesheet" href="ADMIN_CUSTOM/css/form.css">
    <style type="text/css">
    	.span_nav{
    		margin-left: 5px;
    	}
    </style>
{/block}
{block name="body"}
    <body>
        <div class="x-nav">
			<span class="layui-breadcrumb">
				<a href="">首页</a>
				<a href="">演示</a>
				<a><cite>导航元素</cite></a>
			</span>
          	<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
            <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i></a>
        </div>
		<form class="layui-form" lay-filter="add_form"> 
			<ul class="form-btn">
				<li><div class="layui-btn" lay-submit lay-filter="dengdai">等待维修配件</div></li>
				<li><div class="layui-btn" lay-submit lay-filter="baocun">保存</div></li>
				<li><div class="layui-btn" lay-submit lay-filter="queren">确认维修</div></li>
				
				<li><div class="layui-btn">打印维修单</div></li>
				<li><div class="layui-btn">打印维修小票</div></li>
		  	</ul>
	        <div class="layui-fluid">
	            <div class="layui-row layui-col-space15">
	                <div class="layui-col-md12">
	                    <div class="layui-card">
	                        <div class="layui-card-body">
	                        	<!-- 订单信息 start -->
	                            <div class="layui-tab layui-tab-card" style="margin-bottom:15px;">
									<ul class="order_table">
										<li>订单信息</li>
									</ul>
								  	<div class="layui-tab-content tab-content-form">
									 	<span>维修编号：{$repair_sn}</span>
									 	<input type="hidden" name="repair_sn" lay-verify="repair_sn" value="{$repair_sn}">
									 	<span>维修门店：{$shop_name}</span>
									 	<span>营业员：{:session('admin.nkname')}</span>
								  	</div>
								</div>
								<!-- 订单信息 end -->
								<!-- 客户信息 start -->
								<div class="layui-tab layui-tab-card" style="margin-bottom:15px;">
								  	<ul class="order_table">
										<li>客户信息</li>
										<li><div onclick="xadmin.open('用户维修记录','/user/repair/repair_log','','',true)" class="layui-btn white-border-btn">用户维修记录</div></li>
								  	</ul>
								  	<div class="layui-tab-content tab-content-form">
									 	<span>
											<label>客户姓名</label>
										 	<div class="layui-input-inline">
											  	<input type="text" oninput="write_username(this)" placeholder="请输入客户姓名" lay-verify="required" name="username" autocomplete="off" class="layui-input">
										  	</div>
								     	</span>
									 	<span>
											<label>客户称呼</label>
										 	<div class="layui-input-inline">
											  	<input type="text" placeholder="请输入客户称呼" name="nkname" autocomplete="off" class="layui-input">
										  	</div>
								     	</span>
									 	<span>
											<label>联系方式</label>
										 	<div class="layui-input-inline">
											  	<input type="text" placeholder="请输入联系方式" name="phone" autocomplete="off" class="layui-input" lay-verify="required|phone">
										  	</div>
								     	</span>
								     	<span>
											<label>备用联系方式</label>
										 	<div class="layui-input-inline">
											  	<input type="text" placeholder="请输入备用联系方式" name="spare_phone" autocomplete="off" class="layui-input">
										  	</div>
								     	</span>
								     	<span style="display: block;">
											<label>相似客户</label>
											<input type="hidden" name="user_sn" value="">
											<div class="layui-input-inline" id="user-sn">
												<!-- <span class="chakan span_nav" style="cursor:pointer;" onclick="xadmin.open('客户详情','/user/user/details/ids/10001')">10001</span> -->
											</div>
								     	</span>
								  	</div>
								</div>
								<!-- 客户信息 end -->
								<!-- 维修设备信息 start -->
								<div class="layui-tab layui-tab-card" style="margin-bottom:15px;">
								  	<ul class="order_table">
										<li>维修设备信息</li>
										<li><div onclick="xadmin.open('新增维修设备','/repair/fault/index/ty/open_index')" class="layui-btn white-border-btn">新增维修设备</div></li>
								  	</ul>
								  	<div class="layui-tab-content tab-content-form">
									 	<span>
											<label>设备名称<span class="zcc-must-span">*</span></label>
										 	<div class="layui-input-inline">
											  	<input type="text" placeholder="请输入产品名称" name="goods_name" autocomplete="off" lay-verify="required" class="layui-input">
										  	</div>
								     	</span>
									 	<span>
											<label>设备分类<span class="zcc-must-span">*</span></label>
										 	<div class="layui-input-inline">
										 		<select class="layui-select" name="category_name" lay-verify="required" lay-filter="select">
										 			<option value="">请选择设备分类</option>
										 			{volist name="cate" id="v"}
										 			<option value="{$v.describes}@@{$v.fault_id}">{$v.describes}</option>
										 			{/volist}
										 		</select>
										  	</div>
								     	</span>
									 	<span>
											<label>设备品牌<span class="zcc-must-span">*</span></label>
										 	<div class="layui-input-inline">
											  	<select class="layui-select" name="brand_name" lay-verify="required" lay-filter="select">
										 			<option value="">请选择设备品牌</option>
										 			
										 		</select>
										  	</div>
								     	</span>
									 	<span>
											<label>设备型号<span class="zcc-must-span">*</span></label>
										 	<div class="layui-input-inline">
											  	<select class="layui-select" name="marker" lay-verify="required">
										 			<option value="">请选择设备型号</option>
										 		</select>
										  	</div>
								     	</span>
								     	<span>
											<label>颜色<span class="zcc-must-span">*</span></label>
										 	<div class="layui-input-inline">
											  	<input type="text" placeholder="请输入备用联系方式" name="colour_name" lay-verify="required" autocomplete="off" class="layui-input">
										  	</div>
								     	</span>
								     	<span>
											<label>IMEI</label>
										 	<div class="layui-input-inline">
											  	<input type="text" placeholder="请输入IMEI" name="imei" autocomplete="off" class="layui-input">
										  	</div>
								     	</span>
								     	<span>
											<label>S/N</label>
										 	<div class="layui-input-inline">
											  	<input type="text" placeholder="请输入S/N" name="sn" autocomplete="off" class="layui-input">
										  	</div>
								     	</span>
								     	<span>
											<label>数字密码</label>
										 	<div class="layui-input-inline">
											  	<input type="text" placeholder="请输入数字密码" name="pwd" autocomplete="off" class="layui-input">
										  	</div>
								     	</span>
								     	<span>
											<label>客户物品</label>
										 	<div class="layui-input-inline" style="min-width: 300px;">
											  	<input type="text" placeholder="请输入客户物品" name="cus_goods" autocomplete="off" class="layui-input">
										  	</div>
								     	</span>
								     	<span style="display: block;">
											<label>保修类型<span class="zcc-must-span">*</span></label>
										 	<div class="layui-input-inline">
											  	<input type="radio" lay-verify="is_prote" name="is_prote" lay-skin="primary" value="0" title="保内">
							                    <input type="radio" lay-verify="is_prote" style="margin-left: 30px;" name="is_prote" lay-skin="primary" value="1" title="保外">
										  	</div>
								     	</span>
								  	</div>
								</div>
								<!-- 维修设备信息 end -->
								<!-- 维修故障信息 start -->
								<div class="layui-tab layui-tab-card" style="margin-bottom:15px;">
								  	<ul class="order_table">
										<li>维修故障信息</li>
								  	</ul>
								  	<div class="layui-tab-content tab-content-form">
								  		<div class="tab-content-box">
								  			<span>
												<label>外观描述</label>
											 	<div class="layui-input-inline">
												  	<input type="text" onclick="xadmin.open('请选择外观描述','/repair/fault/index/ty/change_outward','900','600')" onfocus="this.blur();" placeholder="请选择外观描述" name="wg_describe" autocomplete="off" class="layui-input">
											  	</div>
									     	</span>
									     	<span>
											 	<div class="layui-input-inline">
												  	<input type="text" placeholder="请输入外观描述" name="wg_write_describe" autocomplete="off" class="layui-input">
											  	</div>
									     	</span>
									     	<div onclick="xadmin.open('编辑外观描述','/repair/fault/index/ty/outward','900','600')" class="layui-btn">编辑外观描述</div>
								  		</div>
								  		<div class="tab-content-box">
								  			<span>
												<label>故障描述</label>
											 	<div class="layui-input-inline">
												  	<input type="text" onclick="xadmin.open('请选择故障描述','/repair/fault/index/ty/change_fault','900','600')" onfocus="this.blur();" placeholder="请选择故障描述" name="gz_describe" autocomplete="off" class="layui-input">
											  	</div>
									     	</span>
									     	<span>
											 	<div class="layui-input-inline">
												  	<input type="text" placeholder="请输入故障描述" name="gz_write_describe" autocomplete="off" class="layui-input">
											  	</div>
									     	</span>
									     	<div onclick="xadmin.open('编辑故障描述','/repair/fault/index/ty/fault','900','600')" class="layui-btn">编辑故障描述</div>
								  		</div>
									 	<span>
											<label>故障备注</label>
										 	<div class="layui-input-inline" style="width: 400px;min-width: 80px;">
											  	<input type="text" placeholder="请输入故障备注" name="gz_remarks" autocomplete="off" class="layui-input">
										  	</div>
								     	</span>
									 	<span>
											<label>处理方法</label>
										 	<div class="layui-input-inline" style="width: 400px;min-width: 80px;">
											  	<input type="text" placeholder="请输入处理方法" name="solutions" autocomplete="off" class="layui-input">
										  	</div>
								     	</span>
								  	</div>
								</div>
								<!-- 维修故障信息 end -->
								<!-- 维修配件 start -->
								<div class="layui-tab layui-tab-card" style="margin-bottom:15px;">
								  	<ul class="order_table">
										<li>维修配件</li>
										<div onclick="xadmin.open('增加维修配件','/repair/goods/change_goods.html')" class="layui-btn white-border-btn">增加维修配件</div>
								  	</ul>
								  	<div class="layui-tab-content tab-content-form">
								  		<table class="layui-table layui-form" id="repair-goods" lay-filter="list">
										  	
										</table>
								  	</div>
								  	<div class="tab-content-form" style="padding: 0 0 10px 0;">
							  			<span style="margin-left: 10px;">
											<label>配件费用（元）：</label>
											<input type="hidden" name="parts_money" value="0">
										 	<div class="layui-input-inline parts_money">0</div>
								     	</span>
								     	<span>
								     		<label>预计时长(天）：</label>
										 	<div class="layui-input-inline">
											  	<input type="text" placeholder="请输入预计天数" lay-verify="required|total_days" name="total_days" autocomplete="off" class="layui-input">
										  	</div>
								     	</span>
							  		</div>
								</div>
								<!-- 维修配件 end -->
								<!-- 维修金信息 start -->
								<div class="layui-tab layui-tab-card" style="margin-bottom:15px;">
								  	<ul class="order_table">
										<li>维修金信息</li>
								  	</ul>
								  	<div class="layui-tab-content tab-content-form">
								  		<div class="tab-content-form">
								  			<span>
												<label>支付方式</label>
											 	<div class="layui-input-inline">
												  	<input type="radio" name="pay_type" lay-verify="pay_type" title="现金支付" value="0">
							                        <input type="radio" style="margin-left: 30px;" lay-verify="pay_type" name="pay_type" title="手机支付" value="1">
							                        <input type="radio" style="margin-left: 30px;" lay-verify="pay_type" name="pay_type" title="银行卡支付" value="2">
											  	</div>
									     	</span>
								  		</div>
								  		<div class="tab-content-form">
								  			<span>
												<label>维修总金额（元）</label>
											 	<div class="layui-input-inline">
												  	<input type="text" lay-verify="required|repair_money" placeholder="请输入维修总金额" onchange="repair_money_fun()" name="repair_money" autocomplete="off" class="layui-input">
											  	</div>
									     	</span>
									     	<span>
									     		<label>已支付金额（元））</label>
											 	<div class="layui-input-inline">
												  	<input type="text" placeholder="请输入客户已支付费用" name="actual_money" autocomplete="off" onchange="actual_money_fun()" lay-verify="required|actual_money" class="layui-input">
											  	</div>
									     	</span>
									     	<span>
									     		<input type="hidden" name="stay_money" value="">
									     		<label>待支付金额（元）：</label>
											 	<div class="layui-input-inline stay_money">xxx.00</div>
									     	</span>
								  		</div>
								  		<div class="tab-content-form">
									     	<span>
									     		<label>配件费用（元）：</label>
											 	<div class="layui-input-inline parts_money">0</div>
									     	</span>
									     	<span>
									     		<input type="hidden" name="people_money" value="">
									     		<label>人工费用（元）：</label>
											 	<div class="layui-input-inline people_money">xxx.00</div>
									     	</span>
								  		</div>
								  	</div>
								</div>
								<!-- 维修金信息 end -->
								<!-- 其它备注 start -->
								<div class="layui-tab layui-tab-card" style="margin-bottom:15px;">
								  	<ul class="order_table">
										<li>其它备注</li>
								  	</ul>
								  	<div class="layui-tab-content tab-content-form">
									 	<span style="display: block;">
										 	<div class="layui-input-inline" style="width: 100%;">
											  	<textarea placeholder="请输入其它备注内容" name="remarks" class="layui-textarea"></textarea>
										  	</div>
								     	</span>
								  	</div>
								</div>
								<!-- 其它备注 end -->
	                        </div>
	                    </div>
	                </div>
	            </div>
	        </div>
        </form> 
    </body>
{/block}
{block name="script"}
	<script type="text/javascript" src="ADMIN_CUSTOM/js/repair/repair_add.js"></script>
	<script type="text/html" id="change-oper">
		<div class="layui-btn layui-bg-red" lay-event="cencel">取消</div>
    </script>
    <script type="text/html" id="number">
		<a class="layui-btn layui-btn-danger" lay-event="add_num">+</a>
		<span class="num">{{d.num}}</span>
		<a class="layui-btn layui-btn-danger" lay-event="cut_num">-</a>
    </script>
{/block}